WordPress database error: [Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'userweb60364.wp_posts.post_date' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]
SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM wp_posts WHERE post_date < '2026-06-19 04:13:09' AND post_date != '0000-00-00 00:00:00' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC


Hacking Random Header and Freshy Theme so they play nicely together

30 12 2006

First you can make some header images that are 780px by 200px and upload them to your theme’s images/ directory. Then hack the code in two files. Yes it is a bit of a hack, but here goes (changes are in red):

In plugins/randomheader.php:

function randomheader() {
  $rh_images = get_option('randomheader_images');
  $rh_options = get_option('randomheader_options');
  if ( count($rh_images)>0 ){
    printf('<style type="text/css">#%1$s {background-image:url(%2$s);background-repeat:no-repeat;background-position:center 75px;}</style>',
           $rh_options['header_id'],$rh_images[array_rand($rh_images)]);
  }
}

In themes/freshy-10/functions.php:

	#title_image {
		margin:0;
		text-align:left;
		display:block;
		height:200px;
		<?php
		if ($freshy_options['header_bg_custom']=='') { ?>

Actions

Information

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>